/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.seari.cctv.handler;
import com.seari.pa.handler.PaClientHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import javax.xml.parsers.ParserConfigurationException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


/**
 *
 * @author 29120
 */
public class CctvClientHandler extends SimpleChannelInboundHandler<Object>
{
        protected static Logger logger = LoggerFactory.getLogger(PaClientHandler.class);
        String str;
	@Override
	public void channelActive(ChannelHandlerContext ctx) throws ParserConfigurationException {
       
            logger.info("channel active.....");

	}
 
	@Override
	public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
		cause.printStackTrace();
		ctx.close();
	}
 

    @Override
    protected void channelRead0(ChannelHandlerContext ctx, Object msg) throws Exception 
    {
        String message = String.valueOf(msg);
        logger.info(message);
    }

}